package com.wy2.entity;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@Table(name = "module")
@Entity
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class Module {
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	//模块编号
	private Integer id;
	//名称
	private String title;
	//父id
	private Integer parentid;
	//path
	private String path;
	//权重
	private Integer weight;
	
	@Transient
	List<Module> children = new ArrayList<Module>();
	
}
